package com.kitty.spring.annotationdriven;

import com.kitty.spring.annotationdriven.beans.Person;
import com.kitty.spring.annotationdriven.configuration.BeanConfig;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Description
 * @Author SHEN
 * @Date 2020/12/6
 */
public class Main {

    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("classpath:/beans.xml");
        Person bean = context.getBean(Person.class);
        System.out.println(bean.toString());

        ApplicationContext app = new AnnotationConfigApplicationContext(BeanConfig.class);

    }
}
